package cn.edu.tjufe.llp.tin.service.sys;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.tjufe.llp.tin.model.sys.SysRole;
import cn.edu.tjufe.llp.tin.repository.sys.SysRoleRepository;

@Service
@Transactional
public class SysRoleServiceImpl implements SysRoleService {
	
	@Autowired
	private SysRoleRepository sysRoleRepository;
	
	@Override
	@Transactional(readOnly = true)
	public List<SysRole> findAll() {
		return sysRoleRepository.findAll();
	}

	@Override
	public SysRole create(SysRole pojo) {
		return sysRoleRepository.save(pojo);
	}

}
